package fem2;

/**
 * Abstract class for all structural demo with homogeneous material
 * 
 * @author hbui
 * 
 */
public abstract class AbstractStructuralFrameStaticDemo extends AbstractStructuralStaticDemo {

	/**
	 * 
	 * @return the homogeneous model (same material, same element type)
	 */
	public Model createModel() {

		Mesh mesh = createMesh();

		mesh.setNumberOfFields(mesh.getDimension());

		Model m = new Model(mesh);

		MaterialModel mm = createMaterial(m);

		for (int i = 0; i < mesh.countEdges(); i++) {
			Element e = createElement(mesh.getEdge(i), mm);
			m.addElement(e);
		}

		m = createConditions(m);

		return m;
	}
}
